#!/bin/bash
#

hour=$(date +%H)

if [ $hour -ge 8 -a $hour -le 12 ];then
   echo "上午"
elif [ $hour -gt 12 -a $hour -le 14 ];then
   echo "中午"
elif [ $hour -gt 14 -a $hour -le 18 ];then
   echo "下午"
else
   echo "晚上"
fi
